 
#include <string.h>
#include <math.h>
#include "system.h"
#include "f1c100s_de.h"
#include "f1c100s_timer.h"
#include "f1c100s_intc.h"
#include "f1c100s_gpio.h"
#include "f1c100s_pwm.h"
#include "f1c100s_uart.h"
#include "arm32.h"
#include "time0.h"
#include "gt911.h"

uint8_t rxbuf0[256];
gt9xx_tpdef tp;
int main(void)
{
  system_init();            // Initialize clocks, mmu, cache, uart, ...
  arm32_interrupt_enable(); // Enable interrupts
  timer0_init();
  printf("\r\napp [GT9XX] run. compiled_time %s %s\r\n", __DATE__, __TIME__);
  delay(200);
  gt9xx_init();
  while (1)
  {

    if (gt9xx_read_tp(&tp))
      printf("tpnums:%d,tp1x:%d,tp1y:%d\r\n", tp.nums, tp.point[0].x, tp.point[0].y);

    delay(20);
  }
}
